package com.xxx.baseapplication.adapter

import com.xxx.baseapplication.R
import com.xxx.baseapplication.databinding.ItemArticleBinding
import com.xxx.baseapplication.util.RouterUtil
import com.xxx.baseapplication.vo.ArticleVO
import com.xxx.mylibrary.base.DataBoundAdapter

class ArticleAdapter : DataBoundAdapter<ArticleVO, ItemArticleBinding>() {

    override fun initView(binding: ItemArticleBinding, item: ArticleVO) {
        binding.vo = item
        binding.root.setOnClickListener {
            RouterUtil.navWeb(item, it.context)
        }
    }

    override val layoutId: Int
        get() = R.layout.item_article
}